//导航栏
Vue.component('vanNavBar', {
    props: ['title'],
    template: `<div class='van-nav-bar'>
        <span @click="$emit('click-left')">&lt;返回</span>
        <span> {{title}} </span>
        <span @click="$emit('click-right')">搜索🔍</span>
        </div>`,
});
//按钮
Vue.component('vanBtn', {
    props: ['title', 'type'],
    template: `<button @click="van-button" v-bind:style="{background:type}" class="van-button">{{title}}</button>`,
});
// loading
Vue.component('vanLoad', {
    props: {
        show: Boolean,
    },
    template: `<div class="van-load" v-show="show"></div>`,
});
//弹窗
Vue.component('vanTips', {
    props: ['title', 'show'],
    template: `<div v-show="show" class="van-tips">{{title}}</div>`,
});
//表格
Vue.component('vanTable', {
    props: ['colmuns', 'data'],
    template: `<table border="1" cellpadding="20" cellspacing="0">
    <tr>
        <th v-for="item in colmuns">{{item.title}}</th>
    </tr>
    <tr v-for="item in data">
        <td v-for="col in colmuns">{{item[col.key]}}</td>

    </tr>
    </table>`,
});
